<div class="yiiForm">
<?php
	echo EHtml::form();	
	EHtml::setOptions(array('errorElement'=> 'span'));
	EHtml::setScenario($update ? 'update' : 'create');				  		
?>
<div>注：<span class="required">*</span>为必填项</div>
<div id="leftaa">
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'name'); ?>
<?php
if($update){
	echo CHtml::encode($model->name);
	echo CHtml::activeHiddenField($model,'name');
}
else
	echo EHtml::activeTextField($model,'name',array('size'=>8,'maxlength'=>16)); 
?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'sex'); ?>
男<?php echo CHtml::activeRadioButton($model,'sex',array('value'=>0,'checked'=>'checked'));?>
女<?php echo CHtml::activeRadioButton($model,'sex',array('value'=>1));?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'birthday'); ?>
<?php echo EHtml::activeTextField($model,'birthday',array('size'=>8,'maxlength'=>10,"id"=>"birthday",)); ?>
<?php $this->widget('application.extensions.calendar.SCalendar',array('inputField'=>'birthday','ifFormat'=>'%Y-%m-%d',));?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'educational_background'); ?>
<?php echo EHtml::activeTextField($model,'educational_background',array('size'=>8,'maxlength'=>10)); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'household_register'); ?>
<?php echo EHtml::activeTextField($model,'household_register',array('size'=>8,'maxlength'=>80)); ?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'card_id'); ?>
<?php echo EHtml::activeTextField($model,'card_id',array('size'=>18,'maxlength'=>18)); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'home_tel'); ?>
<?php echo EHtml::activeTextField($model,'home_tel',array('size'=>16,'maxlength'=>16)); ?>
</div>
</div>
  <div id="rightaa">
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'department'); ?>
<?php echo EHtml::activeTextField($model,'department',array('size'=>10,'maxlength'=>80)); ?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'position'); ?>
<?php echo EHtml::activeTextField($model,'position',array('size'=>10,'maxlength'=>20)); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'office'); ?>
<?php echo EHtml::activeTextField($model,'office',array('size'=>15,'maxlength'=>80)); ?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'entry_time'); ?>
<?php echo EHtml::activeTextField($model,'entry_time',array('size'=>8,'maxlength'=>10,"id"=>"entry_time",)); ?>
<?php $this->widget('application.extensions.calendar.SCalendar',array('inputField'=>'entry_time','ifFormat'=>'%Y-%m-%d',));?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'mobile_no'); ?>
<?php echo EHtml::activeTextField($model,'mobile_no',array('size'=>12,'maxlength'=>12)); ?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'home_addr'); ?>
<?php echo EHtml::activeTextField($model,'home_addr',array('size'=>25,'maxlength'=>80)); ?>
</div>
<div class="simple"></div>
</div>
<div class="action">
<?php echo EHtml::submitButton($update ? '更新信息' : '添加信息'); ?>
</div>

<?php echo EHtml::endForm(); ?>

</div><!-- yiiForm -->
<?php 
if($model->hasErrors()) echo "<script>alert('您填写的信息有误！请根据页面红色图标提示修改。');</script>";
?>